package com.wjw.java.basic.properties_;

/**
 * 属性(成员变量)的细节：见内存图class_object_jvm.png
 * -----------------------------------------------------------
 * 如果属性不赋值,有默认值,规则和数组一样
 * byte   short   int   long   float   double   char   boolean
 * 0      0       0     0      0.0     0.0     \u0000   false
 *
 * String：null
 */
public class PropertiesDetails {
    public static void main(String[] args) {
        Person p = new Person();
        System.out.println(p.age);//0
        System.out.println(p.name);//null
        System.out.println(p.sal);//0.0
        System.out.println(p.isPass);//false
    }
}

class Person{
    int age;
    String name;
    double sal;
    boolean isPass;
}
